// dlg.txt

//MK Edit
//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 57;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "At the far end of the mucky, slimy, rat-infested wastes, you find a small, squat tower. The air is cool and foul here. A constant draft flows out of the tower, chilling you and making you queasy.";
	text2 = "You can tell right away that the tower is occupied. There are fresh, gnawed bones scattered around outside. Some of them are human. A few pathetic skeletons hang from posts.";
	text3 = "Whoever lives here, they have been hunting the cave. Including the miners and other Ro who come down here. The Rokaj, for all of its problems, is under the protection of Haven. The people here are hurting your citizens. It offends you.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "In the middle of the room is a pit. You get close enough to inspect it.";
	text2 = "It is dark, and it goes down a long way. The foul draft comes out of it. It also produces a constant flow of echoing sounds. The squeaks of rats. Guttural growls. Inhuman howls. The shaft goes down a very long way, and it has attracted a lot of pests.";
	text3 = "The vibrations of your footsteps dislodges a bit of stone, which falls into the pit. You listen for the sound of it hitting the ground. You don't hear it.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "The vibrations of your footsteps carry well through the stone. As you cross the hall, you start to hear squeaking. Faint at first, then much louder. First a few rats, then more and more.";
	text2 = "And then the vile rodents start to swarm out of the pit!";
	code =
		activate_hidden_group(1);
		place_particle_num(30001,1077,9,8);
		run_text_on_char(30001,"Surprise Rat!",0);
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "You descend to a second tier surrounding the pit. This room is used for sacrifices. Prey of all sorts is tied to the posts to the east. Then the rats come.";
	text2 = "You don't see any of the mad folk who live here. However, you can hear them chanting. Their inhuman songs echo up from ledges below you.";
	text3 = "As you try to understand what they are saying, you hear another growing wave of squeaks. They are calling more rats and sending them up the shaft.";
	code =
		activate_hidden_group(2);
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "At last, you have reached the living quarters of the rat cult. It is, unsurprisingly, a bunch of mad mages and their slightly less mad apprentices. They have placed a ring of stools around the pit. Here, they work, talk, and commune with their rat pets.";
	text2 = "They also survive by eating the rats. It's a tidy little ecology. Pity about the murders.";
	text3 = "You are still far from the bottom of the pit, though this is as far as this cult reaches.";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "Once again, you find a spot where the cave opens up around the pit. It still extends far below you. It is expelling icy air and the reek of rot. You can still hear the echoing growls of monsters below. There's fewer rat sounds now.";
	text2 = "At the far end of the pit, something is watching you. Watching with many eyes. It floats above the stone floor, near the edge of the pit.";
	text3 = "You recognize it. It's an eyebeast, part of a race of powerful, reclusive magical constructs. Haven almost never deals with them. They're too arrogant, untrustworthy, and dangerous.";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The leader of the rat cult lets out one final, furious squeak. Then he collapses and dies. The cult has been destroyed, and this part of the caves will be far safer for the Rokaj now. A good day's work.";
	text2 = "Yet, you are far from the bottom of the pit. This strange shaft still has strange horrors waiting below.";
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "Tesser Many-Sighted falls to the ground with a big, wet thud. Whatever part of his body granted his levitation, it has been destroyed. These creatures can't live resting on the ground. It gasps a bit, shudders, and dies.";
	text2 = "You have reclaimed another section of the pit for civilization. At least, for now. There are many more horrors below, but you have no safe way to reach them. Once you leave, they are sure to emerge and reclaim these caves.";
	text3 = "The Empire has many places like this. Places of chaos, that can never truly be claimed and civilized. The best you can do is beat back the madness for a short time.";
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "The wounded eyebeast floats out over the pit. Then it stops levitating. It just drops out of sight. In a moment, it is gone.";
	text2 = "For a moment, you thought it was dead. No such luck. It's resting and lurking in the tunnels below you.";
	code =
		erase_char(5735);
	break;
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "Once again, the infuriating creature floats out over the pit. Then it stops levitating. It just drops out of sight. In a moment, it is gone.";
	text2 = "How many more ledges of the pit does Tesser control?";
	code =
		erase_char(5736);
	break;

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You reach the laboratory of this bizarre rat cult. You find the mages' workshop. Their tools, their scrolls. And, most importantly, a pot bubbling with quicksilver brew. That they all frequently drink.";
	text2 = "You encountered this back in Sacramentum. Quicksilver brews, when mixed with the right herbs, can create inspiration and elation. Alas, this is followed by madness.";
	text3 = "The leader of the rat mages faces you from the other side of a magic circle. His skin has a strange tinge, and his eyes are those of a lost soul. He points at you. _Intruder! Defiler!_";
	code =
		set_attitude(5726,10);
		set_attitude(5727,10);
		set_attitude(5728,10);
		activate_hidden_group(3);
		set_char_status(30003,0,8);
		set_char_status(30003,4,8);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_What is your name?_";
	text1 = "_I have no name anymore. I gave it up! I am only the strongest of the swarm._ He twists his face in what he thinks is a ratty way and makes a squeaky noise at you.";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_I'm going to need you to calm down._";
	text1 = "_No! We know why you are here, surface intruder. You aren't the first to hunt us down. Humanity can never be rid of rats! We are eternal!_";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_So. What's with the rats?_";
	text1 = "_Do you not see? The rat is the perfect creature. Wily. Unstoppable. They could do anything, if they were just helped. Explore. Lead. Even cook._";
	text2 = "_Here, we join with rats! We will make new life!_";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_You have been hunting the citizens of Haven, and you must pay._ Attack.";
	text1 = "_Come! Come, my little friends! Swarm! Bear them to the ground!_";
	text1 = "_You are so strong. So much promise. You will not be eaten. You are good stock. You will be beaten down, chained, and we will use our magic to join you with the rat!_";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Like ka-rats?_";
	text1 = "_No! Ka-beasts are mindless. Rats are smart!_";
	
begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_And what are your plans? Explaining the glory of ratkind to the rest of humanity?_";
	text1 = "_We will find a way to join with rats. Then we will join others with rats. A rat-human combination would be unstoppable. It would swarm the earth!_";
	text2 = "You decide against bringing this idea to Mother.";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Very interesting. I think I'll leave now._";
	text1 = "_No! You cannot carry our secrets away. You will not be wasted._";
	text2 = "_You are so strong. So much promise. You will not be eaten. You are good stock. You will be beaten down, chained, and we will use our magic to join you with the rat!_";
	action = END_TALK;

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Your cult needs to end._";
	text1 = "_We are not a cult. We are the future. You will join us now._";
	text2 = "_You are so strong. So much promise. You will not be eaten. You are good stock. You will be beaten down, chained, and we will use our magic to join you with the rat!_";
	action = END_TALK;

//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "The floating orb points its eyes at you. They begin to glow. Its toothy mouth gives you a sneer.";
	text2 = "_We are Tesser Many-Sighted. This is our stretch of the great pit. You intrude. You are prey that has come to us. We will devour you and give your bones to the deep as a gift._";
	code =
		set_attitude(5735,10);
		set_attitude(30005,10);
	break;
	
begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_What is at the bottom of this pit?_";
	text1 = "_The pit has no bottom. We see only more danger and more glory the deeper you go._";
	text2 = "_Below here is alien. We have no way to easily reach it._";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Who are you?_";
	text1 = "_We are the keeper of our little Empire. We listen to the howls of the pit. We hear the secrets of the deep earth!_";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_So you don't even want to negotiate, then?_";
	text1 = "_No. We want your flesh and your wealth. Your bones will be an honored gift to the horrors below!_";
	action = END_TALK;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Die, eyeball monster!_";
	text1 = "_Yes! Yes! We welcome the challenge! We will prove to all we are strong enough to live on the great pit!_";
	action = END_TALK;


	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				